<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button onclick="aa()">aa</button>
    <script src="../js/jquery.min.js"></script>
    <script src="../js/jquery.params.js"></script>
    <script src="../plugs/layui/dist/layui.js"></script>
    <script src="../js/vue.js"></script>
    <script src="../js/app.js"></script>
    <script>
        

        function aa() {
            $.ajax({
                 type:"post", 
                 url:"http://192.168.43.48:5050/run",
                 async:true,
                 contentType: "application/x-www-form-urlencoded",
                 data:{    "cmd": [
        {
            "args": [
                "/usr/bin/javac",
                "Main.java"
            ],
            "env": [
                "PATH=/usr/bin:/bin"
            ],
            "files": [
                {
                    "content": ""
                },
                {
                    "name": "stdout",
                    "max": 10240
                },
                {
                    "name": "stderr",
                    "max": 10240
                }
            ],
            "cpuLimit": 10000000000,
            "memoryLimit": 1048576000,
            "procLimit": 50,
            "copyIn": {
                "Main.java": {
                    "content": "import java.util.Scanner;public class Main{    public static void main(String[] args){        Scanner in=new Scanner(System.in);       int a=in.nextInt();       int b=in.nextInt();       System.out.println((a+b));    }}"
                }
            },
            "copyOut": [
                "stdout",
                "stderr"
            ],
            "copyOutCached": [
                "Main.java"
            ],
            "copyOutDir": "1"
        }
    ]},
                 success: function(data) {
                     console.log(data);
                 }
             });
        }
    </script>
</body>

</html>